fr = open("专利文本.txt","r",encoding = "utf-8")
fw1 = open("train.txt","w",encoding = "utf-8")
fw2 = open("test.txt","w",encoding = "utf-8")

f1 = fr.readlines()
c = 0
for line in f1:
    if c < 2000:
        fw1.write(line)
        c += 1
    else:
        fw2.write(line)
        c += 1


fr.close()
fw1.close()
fw2.close()
